﻿@model TechnicBlog.Models.StudentEntity
@{
    Layout = null;
}

<script>
    function RequestError() {
        $.messager.alert('错误', '<br>请求失败！', 'error');
    }
    function checkSubmit() {
        if ($("#form0").validate()) {
            $('#loading').window('open');
            //document.form0.action = "/Student/Add/" + $("#ClassesId").val();
            $("#form0").ajaxSubmit({ action: this.action, method: this.method });
        }
    }
</script>

<form id="form0" action="/Student/Add" method="post" data-ajax-failure="RequestError"
data-ajax="true">
<fieldset>
    <legend>学生基本信息</legend>
    @Html.HiddenFor(model => model.S_ClassesId)
    <table style="color: #666666; width: 100%;">
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                所属班级：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                    @Html.DisplayFor(model => model.Classes.ClassName)
                </div>
            </td>
        </tr>
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                学生姓名：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.S_Name, new { require = "true"})
                </div>
            </td>
        </tr>
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                性别：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                    @Html.DropDownListFor(model=>model.S_Sex, new[] { new SelectListItem { Text = "男", Value = "1"}, new SelectListItem { Text = "女", Value = "0" } }, new { style = "width:155px" })
                </div>
            </td>
        </tr>
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                出生年月：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                   @Html.TextBoxFor(model => model.S_Birthday, new { @class = "easyui-datebox", require = "true",@style="width:155px;" })
                </div>
            </td>
        </tr>
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                联系手机：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.S_Mobile, new {mobile="true" })
                </div>
            </td>
        </tr>
        <tr style="height: 28px;">
            <td style="width: 20%;" align="right">
                联系地址：
            </td>
            <td style="width: 80%;" align="left">
                <div class="editor-field">
                    @Html.EditorFor(model => model.S_Address)
                </div>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <a class="easyui-linkbutton"
                    iconcls="icon-save" onclick="return checkSubmit();">提交</a>
                    <a class="easyui-linkbutton"
                    iconcls="icon-back" onclick="javascript:TreeLink('Student/Index', '学生基本信息列表');">返回</a>
            </td>
        </tr>
    </table>
</fieldset>
</form>
@*}*@

